package com.anan;

import java.awt.*;

/**
 * @Author: Painter
 * @project_name: aircraft-war
 * @system_login: sunshine
 * @time: 2023/11/520:13
 */



public class SmallEnemy {
    public int x;  // 坐标
    public int y;
    public int speed = random.randint(1,5);  // 随机移动速度
    public Image image;  // 图片
    public boolean Isalive = true;  // 是否活着
    public int aliveValue = 1;

    public SmallEnemy() {
        this.image = Imagevalue.enemy1;  // 加载图片
        this.x = random.randint(60,GameFrame.WIDTH-60);  // 设置初始随机坐标
        this.y = random.randint(-(GameFrame.HEIGHT),0);

    }

    public void move(){  // 移动
        this.y += speed;  // 增加y坐标
        if(this.y>GameFrame.HEIGHT){  // 如果y坐标大于1000
            this.Isalive = false;
        }
    }


}
